package extreme.fizzbuzz.gildedrose;

/**
 * ClassName: AgedBrie
 * Description:
 * Date: 2022/2/15 19:57
 *
 * @author YangXin
 */
public class AgedBrie {

    private int sellIn;
    private int quantity;

    public AgedBrie(int sellIn, int quantity) {
        this.sellIn = sellIn;
        this.quantity = quantity;
    }

    public void oneDayPass() {
        sellIn = sellIn - 1;
        quantity = quantity + 1;
        if (sellIn < 0) {
            quantity = quantity + 1;
        }
        if (quantity > 50) {
            quantity = 50;
        }
    }

    public int getSellIn() {
        return sellIn;
    }

    public int getQuantity() {
        return quantity;
    }
}
